package com.lh.tams.util.diy;

import java.util.Date;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.support.WebBindingInitializer;
import org.springframework.web.context.request.WebRequest;

public class MyWebBinding implements WebBindingInitializer {

	public void initBinder(WebDataBinder binder, WebRequest request) {
		//注册PropertyEditorSupport
		binder.registerCustomEditor(Date.class, new DateConvertEditor());
		binder.registerCustomEditor(int.class, new IntConvertEditor());
		binder.registerCustomEditor(float.class, new FloatConvertEditor());
		binder.registerCustomEditor(long.class, new LongConvertEditor());

	}

}
